/**
 * @User: vitobo
 * @Date: 2024-06-23
 * @Description: 二叉树学习
 *
 *
 *
 */
public class Test {
    public static void main(String[] args) {
        TestBinaryTree testBinaryTree = new TestBinaryTree();
        TestBinaryTree.TreeNode root = testBinaryTree.createTree();
        testBinaryTree.preOrder(root);
        System.out.println();
        testBinaryTree.inOrder(root);
        System.out.println();
        testBinaryTree.postOrder(root);
        System.out.println();

        System.out.println("=================");

        System.out.println("树的节点个数: " + testBinaryTree.size(root));
        System.out.println("=================");

        System.out.println("树的叶子节点个数: " + testBinaryTree.getLeafNodeCount(root));
        System.out.println("=================");

        System.out.println("第k层节点个数: " + testBinaryTree.getKLevelNodeCount(root, 4));
        System.out.println("=================");



    }
}
